package cn.akwangl.design.pattern.behavioral.strategy.v1;

/**
 * 策略模式#v1
 *
 * @author youyongkun
 * @date 2021/12/6 21:55
 */
public class StrategyTest {

    public static void main(String[] args) {
        Context c = new Context();
        Strategy s = new ConcreteStrategyA();
        c.setStrategy(s);
        c.strategyMethod();
        System.out.println("-----------------");
        s = new ConcreteStrategyB();
        c.setStrategy(s);
        c.strategyMethod();
    }
}
